package com.httpserver.one;

import java.io.IOException;
import java.net.ServerSocket;
import java.net.Socket;

/**
 *@project:HttpServerDemo 
 *@author   wuhn
 *@version  1.0
 *@createTime:2017年9月18日 下午12:23:37
 *@description:  研究下web服务器的源程序
 */
public class HttpServerOne {
	
	
	public static  String ROOT="./WebContent"; 
	public static  String defaultPage="index.html"; 
	
	
	public static void main(String[] args) throws IOException {
		@SuppressWarnings("resource")
		ServerSocket server =new ServerSocket(8000);

		while(true){
			final Socket socket = server.accept();
			System.out.println("accepting  connection ...\n");
			//启动服务线程
			new HttpThread(socket).start();
		}
	}
	
}
